package state.util.array;

public class CharArray {
  public StringBuffer array = null;
  private int size = 0;
  
  public static CharArray create(int len) {
    StringBuffer value1 = new StringBuffer();
    value1.setLength(len);
    return new CharArray(value1);
  }
  
  public CharArray(StringBuffer value1) {
    array = value1;
    size = value1.length();
  }
  
  public int len() {
    return size;
  }
  
  public char get(int i) {
    return array.charAt(i);
  }
  
  public void set(int i, char value1) {
    array.setCharAt(i, value1);
  }
  
  public void setArray(StringBuffer value1, int length1) {
    array = value1;
    size = length1;
  }
}
